<template>
    <div class=''>
        <h2>我的收藏</h2>
        <van-swipe-cell v-for="item in $store.state.likeadd" :key="item.product_id">
            <van-card :price="item.product_price" :title="item.product_name" class="goods-card"
                :thumb="item.product_picture" />
                <template #right>
                    <van-button @click="out(item)" square text="删除" type="danger" class="delete-button" />
                </template>
        </van-swipe-cell>
    </div>
</template>

<script>
    export default {
        data() {
            return {};
        },
        mounted() {},
        methods: {
            out(item){
                this.$store.commit("out",item)
            }
        },
    };
</script>

<style lang='scss'>
.delete-button {
        height: 100%;
    }
</style>